package deweb.cimaplanning.dto;

/**
 * @author Rene
 *
 */
public class CostsPlants {
	protected int plantVersionId;
	protected int cornTypeId;
	protected String cornOriginId;
	protected int costElementId;
	protected double initialCost;
	protected double initialTons;
	protected double initialUsd;
	protected double incomingCost;
	protected double incomingTons;
	protected double incomingUsd;
	protected double availableCost;
	protected double availableTons;
	protected double availableUsd;
	protected double grindCost;
	protected double grindTons;
	protected double grindUsd;
	protected double finalCost;
	protected double finalTons;
	protected double finalUsd;
	
	/**
	 * @return the plantVersionId
	 */
	public int getPlantVersionId() {
		return plantVersionId;
	}
	/**
	 * @param plantVersionId the plantVersionId to set
	 */
	public void setPlantVersionId(int plantVersionId) {
		this.plantVersionId = plantVersionId;
	}
	/**
	 * @return the cornTypeId
	 */
	public int getCornTypeId() {
		return cornTypeId;
	}
	/**
	 * @param cornTypeId the cornTypeId to set
	 */
	public void setCornTypeId(int cornTypeId) {
		this.cornTypeId = cornTypeId;
	}
	/**
	 * @return the cornOriginId
	 */
	public String getCornOriginId() {
		return cornOriginId;
	}
	/**
	 * @param cornOriginId the cornOriginId to set
	 */
	public void setCornOriginId(String cornOriginId) {
		this.cornOriginId = cornOriginId;
	}
	/**
	 * @return the costElementId
	 */
	public int getCostElementId() {
		return costElementId;
	}
	/**
	 * @param costElementId the costElementId to set
	 */
	public void setCostElementId(int costElementId) {
		this.costElementId = costElementId;
	}
	/**
	 * @return the initialCost
	 */
	public double getInitialCost() {
		return initialCost;
	}
	/**
	 * @param initialCost the initialCost to set
	 */
	public void setInitialCost(double initialCost) {
		this.initialCost = initialCost;
	}
	/**
	 * @return the initialTons
	 */
	public double getInitialTons() {
		return initialTons;
	}
	/**
	 * @param initialTons the initialTons to set
	 */
	public void setInitialTons(double initialTons) {
		this.initialTons = initialTons;
	}
	/**
	 * @return the initialUsd
	 */
	public double getInitialUsd() {
		return initialUsd;
	}
	/**
	 * @param initialUsd the initialUsd to set
	 */
	public void setInitialUsd(double initialUsd) {
		this.initialUsd = initialUsd;
	}
	/**
	 * @return the incomingCost
	 */
	public double getIncomingCost() {
		return incomingCost;
	}
	/**
	 * @param incomingCost the incomingCost to set
	 */
	public void setIncomingCost(double incomingCost) {
		this.incomingCost = incomingCost;
	}
	/**
	 * @return the incomingTons
	 */
	public double getIncomingTons() {
		return incomingTons;
	}
	/**
	 * @param incomingTons the incomingTons to set
	 */
	public void setIncomingTons(double incomingTons) {
		this.incomingTons = incomingTons;
	}
	/**
	 * @return the incomingUsd
	 */
	public double getIncomingUsd() {
		return incomingUsd;
	}
	/**
	 * @param incomingUsd the incomingUsd to set
	 */
	public void setIncomingUsd(double incomingUsd) {
		this.incomingUsd = incomingUsd;
	}
	/**
	 * @return the availableCost
	 */
	public double getAvailableCost() {
		return availableCost;
	}
	/**
	 * @param availableCost the availableCost to set
	 */
	public void setAvailableCost(double availableCost) {
		this.availableCost = availableCost;
	}
	/**
	 * @return the availableTons
	 */
	public double getAvailableTons() {
		return availableTons;
	}
	/**
	 * @param availableTons the availableTons to set
	 */
	public void setAvailableTons(double availableTons) {
		this.availableTons = availableTons;
	}
	/**
	 * @return the availableUsd
	 */
	public double getAvailableUsd() {
		return availableUsd;
	}
	/**
	 * @param availableUsd the availableUsd to set
	 */
	public void setAvailableUsd(double availableUsd) {
		this.availableUsd = availableUsd;
	}
	/**
	 * @return the grindCost
	 */
	public double getGrindCost() {
		return grindCost;
	}
	/**
	 * @param grindCost the grindCost to set
	 */
	public void setGrindCost(double grindCost) {
		this.grindCost = grindCost;
	}
	/**
	 * @return the grindTons
	 */
	public double getGrindTons() {
		return grindTons;
	}
	/**
	 * @param grindTons the grindTons to set
	 */
	public void setGrindTons(double grindTons) {
		this.grindTons = grindTons;
	}
	/**
	 * @return the grindUsd
	 */
	public double getGrindUsd() {
		return grindUsd;
	}
	/**
	 * @param grindUsd the grindUsd to set
	 */
	public void setGrindUsd(double grindUsd) {
		this.grindUsd = grindUsd;
	}
	/**
	 * @return the finalCost
	 */
	public double getFinalCost() {
		return finalCost;
	}
	/**
	 * @param finalCost the finalCost to set
	 */
	public void setFinalCost(double finalCost) {
		this.finalCost = finalCost;
	}
	/**
	 * @return the finalTons
	 */
	public double getFinalTons() {
		return finalTons;
	}
	/**
	 * @param finalTons the finalTons to set
	 */
	public void setFinalTons(double finalTons) {
		this.finalTons = finalTons;
	}
	/**
	 * @return the finalUsd
	 */
	public double getFinalUsd() {
		return finalUsd;
	}
	/**
	 * @param finalUsd the finalUsd to set
	 */
	public void setFinalUsd(double finalUsd) {
		this.finalUsd = finalUsd;
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		long temp;
		temp = Double.doubleToLongBits(availableCost);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(availableTons);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(availableUsd);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result
				+ ((cornOriginId == null) ? 0 : cornOriginId.hashCode());
		result = prime * result + cornTypeId;
		result = prime * result + costElementId;
		temp = Double.doubleToLongBits(finalCost);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(finalTons);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(finalUsd);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(grindCost);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(grindTons);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(grindUsd);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(incomingCost);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(incomingTons);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(incomingUsd);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(initialCost);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(initialTons);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(initialUsd);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + plantVersionId;
		return result;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof CostsPlants))
			return false;
		CostsPlants other = (CostsPlants) obj;
		if (Double.doubleToLongBits(availableCost) != Double
				.doubleToLongBits(other.availableCost))
			return false;
		if (Double.doubleToLongBits(availableTons) != Double
				.doubleToLongBits(other.availableTons))
			return false;
		if (Double.doubleToLongBits(availableUsd) != Double
				.doubleToLongBits(other.availableUsd))
			return false;
		if (cornOriginId == null) {
			if (other.cornOriginId != null)
				return false;
		} else if (!cornOriginId.equals(other.cornOriginId))
			return false;
		if (cornTypeId != other.cornTypeId)
			return false;
		if (costElementId != other.costElementId)
			return false;
		if (Double.doubleToLongBits(finalCost) != Double
				.doubleToLongBits(other.finalCost))
			return false;
		if (Double.doubleToLongBits(finalTons) != Double
				.doubleToLongBits(other.finalTons))
			return false;
		if (Double.doubleToLongBits(finalUsd) != Double
				.doubleToLongBits(other.finalUsd))
			return false;
		if (Double.doubleToLongBits(grindCost) != Double
				.doubleToLongBits(other.grindCost))
			return false;
		if (Double.doubleToLongBits(grindTons) != Double
				.doubleToLongBits(other.grindTons))
			return false;
		if (Double.doubleToLongBits(grindUsd) != Double
				.doubleToLongBits(other.grindUsd))
			return false;
		if (Double.doubleToLongBits(incomingCost) != Double
				.doubleToLongBits(other.incomingCost))
			return false;
		if (Double.doubleToLongBits(incomingTons) != Double
				.doubleToLongBits(other.incomingTons))
			return false;
		if (Double.doubleToLongBits(incomingUsd) != Double
				.doubleToLongBits(other.incomingUsd))
			return false;
		if (Double.doubleToLongBits(initialCost) != Double
				.doubleToLongBits(other.initialCost))
			return false;
		if (Double.doubleToLongBits(initialTons) != Double
				.doubleToLongBits(other.initialTons))
			return false;
		if (Double.doubleToLongBits(initialUsd) != Double
				.doubleToLongBits(other.initialUsd))
			return false;
		if (plantVersionId != other.plantVersionId)
			return false;
		return true;
	}
	
	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "deweb.cimaplanning.dto.CostsPlants: " );
		ret.append( "plantVersionId=" + plantVersionId );
		ret.append( ", cornTypeId=" + cornTypeId );
		ret.append( ", cornOriginId=" + cornOriginId );
		ret.append( ", costElementId=" + costElementId );
		ret.append( ", initialCost=" + initialCost );
		ret.append( ", initialTons=" + initialTons );
		ret.append( ", initialUsd=" + initialUsd );
		ret.append( ", incomingCost=" + incomingCost );
		ret.append( ", incomingTons=" + incomingTons );
		ret.append( ", incomingUsd=" + incomingUsd );
		ret.append( ", availableCost=" + availableCost );
		ret.append( ", availableTons=" + availableTons );
		ret.append( ", availableUsd=" + availableUsd );
		ret.append( ", grindCost=" + grindCost );
		ret.append( ", grindTons=" + grindTons );
		ret.append( ", grindUsd=" + grindUsd );
		ret.append( ", finalCost=" + finalCost );
		ret.append( ", finalTons=" + finalTons );
		ret.append( ", finalUsd=" + finalUsd );
		return ret.toString();
	}
}
